/*
 * @Description: 路由配置文件
 * @Autor: 赖维健(lwj1994)
 * @Date: 2021-09-28 09:56:40
 * @LastEditors: 赖维健(lwj1994)
 * @LastEditTime: 2021-11-16 20:56:06
 */

import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  {
    name: 'home',
    path: '/',
    component: () => import('@/views/home/index.vue'),
  },
  {
    name: 'collect',
    path: '/collect',
    meta: {
      title: '色彩空间'
    },
    component: () => import('@/views/collect/index.vue')
  },
  {
    name: 'setting',
    path: '/setting',
    meta: {
      title: '魔法色'
    },
    component: () => import('@/views/setting/index.vue')
  },
  {
    name: '404',
    path: '/404',
    component: () => import('@/views/error/404.vue')
  },
  {
    path: '/:pathMatch(.*)',
    redirect: '/404'
  }
]

export default createRouter({
  history: createWebHashHistory(),
  routes,
})
